<template>
  <div class="answers_category">
    <div class="category_list" v-for="categoryItem in answersData.data" :key="categoryItem.key">
        <h3 class="category_list_title">{{ categoryItem.label }}</h3>
        <ul class="category_list_ul">
            <li class="category_list_item" v-for="item in categoryItem.data" :key="item.id"
                @click="handleCategoryItem(item,item.level1Title)">
                {{ item.level1Title }}
            </li>
        </ul>
    </div>
  </div>
</template>

<script>
import { setQueryByPath } from '@/utils/setChatStoreData.js'
export default {
    name: 'AnswersCategory',
    props: ['answersData'],
    data(){
        return {

        }
    },
    methods: {
        // 题库列表按钮事件
        handleCategoryItem(item,queryText){
            setQueryByPath(this,item,queryText);
        }
    }
}
</script>

<style>
@import url('~@/assets/css/home/answersCategory.css');
</style>
